<?php

/**
 * Created on February 8, 2011
 * @Author Mike Tierney
 * This is the control file.
 * It acts as the medium between the viewInternship.php file,
 * and the dbInternship.php file.
 */
class Internship {

    //these private variables are only accessible in this class,
    //we have to use functions or other methods to use them
    private $internshipID;
    private $opportunityID;
    private $studentID;
    private $hours;
    private $special;
    private $semester;

    function __construct($opportunityID, $studentID, $hours, $special, $semester) {
        $this->internshipID = "null";
        $this->opportunityID = $opportunityID;
        $this->studentID = $studentID;
        $this->hours = $hours;
        $this->special = $special;
        $this->semester = $semester;
    }

    function setInternshipID($internshipID) {
        $this->internshipID = $internshipID;
    }

    function setOpportunityID($opportunityID) {
        $this->opportuntyID = $opportunityID;
    }

    function setStudentID($studentID) {
        $this->studentID = $studentID;
    }

    function setHours($hours) {
        $this->hours = $hours;
    }

    function setSpecial($special) {
        $this->special = $special;
    }

    function setSemester($semester) {
        $this->semester = $semester;
    }

    function getInternshipID() {
        return $this->internshipID;
    }

    function getOpportunityID() {
        return $this->opportunityID;
    }

    function getStudentID() {
        return $this->studentID;
    }

    function getHours() {
        return $this->hours;
    }

    function getSpecial() {
        return $this->special;
    }

    function getSemester() {
        return $this->semester;
    }

    function printAllAttributes() {
        $output = sprintf("Opportunity ID: %d, Student ID: %d, Hours: %s,
                          Spedcial: %s, Semester: %s.",
                        $this->opportunityID, $this->studentID, $this->hours,
                        $this->special, $this->semester);
        return $output;
    }
}

?>